﻿using DC2010.Objects;
using DC2010.Objects.Base;
using DC2010.Objects.Data;

namespace DC2010.Effects
{
    public class I_IncreaseStat_Effect : EffectLogic
    {
        public I_IncreaseStat_Effect(EffectData ed) : base(ed)
        {
            ShortName = "INCREASE STAT";
            LongName = "Effect increases/decreses specific stat for creature.";
            Id = "I_INCREASE_STAT_EFFECT";
            EffectType = EffectType.Instant;
        }

        public override void Instant(BaseObject aInvoker, BaseObject aTarget)
        {
            if (aInvoker is CreatureData)
            {
                CreatureData c = (CreatureData)aInvoker;

                string Stat = Data.Params.Find(A => A.Key == "STAT").Value;
                int Amount = Data.Params.Find(A => A.Key == "AMOUNT").Value.ToInt();

                switch (Stat)
                {
                    //case "HEALTH":
                    //    {
                    //        c.Attributes.Health.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "STAMINA":
                    //    {
                    //        c.Stamina.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "MANA":
                    //    {
                    //        c.Mana.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "LUCK":
                    //    {
                    //        c.Luck.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "STR":
                    //    {
                    //        c.Stamina.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "DEX":
                    //    {
                    //        c.Dexterity.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "WIS":
                    //    {
                    //        c.Wisdom.BoostedAmount = Amount;
                    //        break;
                    //    }
                    //case "VIT":
                    //    {
                    //        c.Vitality.BoostedAmount = Amount;
                    //        break;
                    //    }
                }
            }

            base.Instant(aInvoker, aTarget);
        }
    }
}
